﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace TestWcfStream
{
    class WrongMyService
    {
        private string fileName = "file";

public Stream GetMyStream(int size)
{
    FileStream stream = new FileStream(fileName, FileMode.Create, FileAccess.ReadWrite, FileShare.Read);
    BinaryWriter writer = new BinaryWriter(stream, Encoding.UTF8)
    DoStaff(writer, ...);
    writer.Flush();
    stream.Position = 0;
    return stream;
}

        void DoStaff(BinaryWriter writer, args...)
        {
        }


    }
}
